package com.ruoyi.common.enums;



public enum StreamProtocol {
    RTSP(1, "RTSP"),
    RTMP(2, "RTMP"),
    HLS(3, "HLS"),
    HLS_SSL(4, "HLS_SSL"),
    HTTP_FLV(5, "HTTP FLV"),
    HTTPS_FLV(6, "HTTPS FLV"),
    WS_FLV(7, "WS FLV"),
    WSS_FLV(8, "WSS FLV");

    public final int value;
    public final String description;

    StreamProtocol(int value, String description) {
        this.value = value;
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public static String getDescriptionByValue(int value) {
        for (StreamProtocol protocol : StreamProtocol.values()) {
            if (protocol.value == value) {
                return protocol.getDescription();
            }
        }
        return null; // 如果没有匹配的值，则返回 null 或者抛出异常，取决于实际需求
    }
}
